using Microsoft.DirectX.Direct3D;
using SharpWars.Core.Helpers;
using System;
using System.Drawing;

public class Utils
{
	// 'JS' begin -->
	public static float Clamp( float Min, float Max, float Value )
	{
		if( Value < Min )
		{
			return Min;
		}
		else if( Value > Max )
		{
			return Max;
		}
		else
		{
			return Value;
		}
	}

	/// <summary> Bo inaczej sie nie da, tak sobie MS wymyslil... </summary>
	public static PointF Offset( PointF Pos, float X, float Y )
	{
		return new PointF( Pos.X + X, Pos.Y + Y );
	}

	/// <summary> Bo inaczej sie nie da, tak sobie MS wymyslil... </summary>
	public static PointF Offset( PointF Pos, PointF Off )
	{
		return new PointF( Pos.X + Off.X, Pos.Y + Off.Y );
	}

	/// <summary> Wymiary ramek itp </summary>
	static public Point Borders;

	// 'JS' end   <--
}
